package Lian01;

import java.io.IOException;
import java.io.PrintWriter;
import java.nio.file.Paths;
import java.util.Scanner;

public class KongZhiTai {
    public static void main(String[] args) throws IOException {
//        System.out.println("请输入你的姓名");
//        Scanner input  =new Scanner(System.in);
//        String name = input.next();
//        System.out.println("姓名"+name);
//        System.out.println("请再输入你的姓名");
//        String name1 = input.nextLine();

//        System.out.println("姓名"+name1);
//        System.out.printf("%d年%d月%d日",2022,8,19);// 占位符 %d

        Scanner scanner =new Scanner(Paths.get("D:\\JAVA2022\\com.-java.-lcm\\src\\main\\java\\resources\\a.txt")
        ,"UTF-8");
         String str = scanner.nextLine();
        System.out.println(str);
        str = scanner.nextLine();
        System.out.println(str);

        PrintWriter printWriter = new PrintWriter("b.txt");
        printWriter.println("好开心");
        printWriter.close();

    }
}
